<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: Origami::XRef::Section</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">Origami::XRef::Section</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../files/origami/xreftable_rb.html">
                origami/xreftable.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                Object
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
Class representing a Cross-reference table. A section contains a set of
XRefSubsection.
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000431">&lt;&lt;</a>&nbsp;&nbsp;
      <a href="#M000432">[]</a>&nbsp;&nbsp;
      <a href="#M000434">each</a>&nbsp;&nbsp;
      <a href="#M000433">find</a>&nbsp;&nbsp;
      <a href="#M000430">new</a>&nbsp;&nbsp;
      <a href="#M000435">to_s</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000430" class="method-detail">
        <a name="M000430"></a>

        <div class="method-heading">
          <a href="#M000430" class="method-signature">
          <span class="method-name">new</span><span class="method-args">(subsections = [])</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Creates a <a href="Section.html#M000430">new</a> <a
href="../XRef.html">XRef</a> section.
</p>
<table>
<tr><td valign="top"><em>subsections</em>:</td><td>An array of XRefSubsection.

</td></tr>
</table>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000430-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000430-source">
<pre>
     <span class="ruby-comment cmt"># File origami/xreftable.rb, line 218</span>
218:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">subsections</span> = [])
219:         <span class="ruby-ivar">@subsections</span> = <span class="ruby-identifier">subsections</span>
220:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000431" class="method-detail">
        <a name="M000431"></a>

        <div class="method-heading">
          <a href="#M000431" class="method-signature">
          <span class="method-name">&lt;&lt;</span><span class="method-args">(subsection)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Appends a <a href="Section.html#M000430">new</a> subsection.
</p>
<table>
<tr><td valign="top"><em>subsection</em>:</td><td>A XRefSubsection.

</td></tr>
</table>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000431-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000431-source">
<pre>
     <span class="ruby-comment cmt"># File origami/xreftable.rb, line 240</span>
240:       <span class="ruby-keyword kw">def</span> <span class="ruby-operator">&lt;&lt;</span>(<span class="ruby-identifier">subsection</span>)
241:         <span class="ruby-ivar">@subsections</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">subsection</span>
242:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000432" class="method-detail">
        <a name="M000432"></a>

        <div class="method-heading">
          <a href="#M000432" class="method-signature">
          <span class="method-name">[]</span><span class="method-args">(no)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns a <a href="../XRef.html">XRef</a> associated with a given object.
</p>
<table>
<tr><td valign="top"><em>no</em>:</td><td>The <a href="../Object.html">Object</a> number.

</td></tr>
</table>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000432-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000432-source">
<pre>
     <span class="ruby-comment cmt"># File origami/xreftable.rb, line 248</span>
248:       <span class="ruby-keyword kw">def</span> <span class="ruby-operator">[]</span>(<span class="ruby-identifier">no</span>)
249:         <span class="ruby-ivar">@subsections</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
250:           <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">s</span>[<span class="ruby-identifier">no</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">has_object?</span>(<span class="ruby-identifier">no</span>)
251:         }
252:         <span class="ruby-keyword kw">nil</span>
253:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000434" class="method-detail">
        <a name="M000434"></a>

        <div class="method-heading">
          <a href="#M000434" class="method-signature">
          <span class="method-name">each</span><span class="method-args">(&amp;b)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Processes <a href="Section.html#M000434">each</a> XRefSubsection.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000434-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000434-source">
<pre>
     <span class="ruby-comment cmt"># File origami/xreftable.rb, line 260</span>
260:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">b</span>)
261:         <span class="ruby-ivar">@subsections</span>.<span class="ruby-identifier">each</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">b</span>)
262:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000433" class="method-detail">
        <a name="M000433"></a>

        <div class="method-heading">
          <span class="method-name">find</span><span class="method-args">(no)</span>
        </div>
      
        <div class="method-description">
          <p>
Alias for #[]
</p>
        </div>
      </div>

      <div id="method-M000435" class="method-detail">
        <a name="M000435"></a>

        <div class="method-heading">
          <a href="#M000435" class="method-signature">
          <span class="method-name">to_s</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Outputs self into <a href="../PDF.html">PDF</a> code.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000435-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000435-source">
<pre>
     <span class="ruby-comment cmt"># File origami/xreftable.rb, line 267</span>
267:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_s</span>
268:         <span class="ruby-value str">&quot;xref&quot;</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">EOL</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-ivar">@subsections</span>.<span class="ruby-identifier">join</span>
269:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>